import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/src/widgets/placeholder.dart';
import 'package:full_display/unit/asset_utils/asset_utils.dart';
import 'package:full_display/unit/screen/screen_utility.dart';
import 'package:full_display/unit/widgets/slider/media_show.dart';

class CropMediaDialog extends StatefulWidget {
  final String path;
  const CropMediaDialog({super.key, required this.path});

  @override
  State<CropMediaDialog> createState() => _CropMediaDialogState();
}

class _CropMediaDialogState extends State<CropMediaDialog> {
  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        MediaShow(
          url: widget.path,
          tapAction: (BuildContext context1) {
            Navigator.pop(context1);
            Navigator.pop(context);
          },
        ),
        InkWell(
          child: Container(
            padding: EdgeInsets.all(20.0.W),
            child: Image.asset(
                height: 20.0.H,
                width: 20.0.W,
                AssetUtils.getAsset2Image("back")),
          ),
          onTap: () {
            Navigator.pop(context);
          },
        )
      ],
    );
  }
}
